const express = require('express')
const routerPower = express.Router()

const handle = require('../router_handler/authorization')
routerPower.get('/rights/:type', handle.getPower);
routerPower.get('/roles', handle.rolesList);
//添加角色
routerPower.post('/roles', handle.addRoles)
    //根据 ID 查询角色
routerPower.get('/roles/:id', handle.searchRoles)
    //编辑提交角色
routerPower.put('/roles/:id', handle.updateRoles)
    //删除角色
routerPower.delete('/roles/:id', handle.deleteRoles)
routerPower.post('/roles/:roleId/rights', handle.updataRoleRight)
routerPower.delete('/roles/:roleId/rights/:rightId', handle.Roledelete)
module.exports = routerPower